<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="/WEB-INF/jsp/common/include.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>主页 | 短信平台</title>
<jsp:include page="/WEB-INF/jsp/common/commonlist.jsp"></jsp:include>
<script>
	function bodyLoad(){
		activeMenuItem("financeManageItem","financeDetailItem");
	}
	
	//提交查询
	function submitForm(pageNo){
		$('#pageNo').attr("value",pageNo);
		$('#form1').submit();
	}
	

	$(document).ready(function() {
		$("#datepicker").datepicker();
		$("#datepicker2").datepicker();
	}); 
</script>
</head>
<body onload="bodyLoad()">
<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <div id="sidebar">
    <div id="sidebar-wrapper">
      <!-- Sidebar with logo and menu -->
      <h1 id="sidebar-title"><a href="#">短信平台</a></h1> 
      <!-- Logo (221px wide) -->

      <!-- Sidebar Profile links -->
                <!--  页面左上角的部分 -->
     <%@include file="/WEB-INF/jsp/common/leftTop.jsp" %>
     <!-- 页面左侧菜单部分 -->
     <%@include file="/WEB-INF/jsp/common/menu.jsp" %>
    </div>
  </div>
  <!-- End #sidebar -->
  <div id="main-content">
    <!-- Main Content Section with everything -->
  
    <!-- Page Head -->
   <%@ include file="/WEB-INF/jsp/common/top.jsp" %>
    <!-- End .shortcut-buttons-set -->
    <div class="clear"></div>
    <!-- End .clear -->
    <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>财务明细查询</h3>
        <ul class="content-box-tabs">
        </ul>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
        <form action="financeDetailList.do" method="post"    id="form1">
        	<input type="hidden" name="pageNo" id="pageNo" value="1">
           <table>
              <tr style="background-color: rgb(229, 229, 229);">
                <td><label style="padding-bottom: 0px;">用户名：</label></td>
                <td><input type="text" id=""    value="${userName }" name="userName" /></td>
                <td><label style="padding-bottom: 0px;">操作类型：</label>                	                </td>
                <td><select name="operateType">
                		<option value="" >全部</option>
                		<option value="00"   <c:if test="${operateType eq '00' }"> selected</c:if> 
                		>管理员充值</option>
                		<option value="01" <c:if test="${operateType eq '01' }"> selected</c:if>
                		>代理商充值</option>
                		<option value="10"  <c:if test="${operateType eq '10' }"> selected</c:if>
                		>发送短信</option>
                	</select>
                </td>
                <td><label style="padding-bottom: 0px;">日期：</label></td>
                <td>
                	<input type="text"   id="datepicker"   name="beginDate"  readonly="readonly"   value="${beginDate }"/>到</td>
                <td><input type="text" id="datepicker2" name="endDate"   value="${endDate }"  readonly="readonly" /></td>
                <td><input type="button" value="查询"  onclick="submitForm()"  ></td></tr> 
          </table>
          <table>
            <thead>
              <tr>                
                <th>用户名</th>
                <th>操作类型</th>
                <th>消费详情</th>
                <th>变动数量</th>
                <th>当前余额</th>
                <th>操作时间</th>
                <th>备注</th>
              </tr>
            </thead>
            <tfoot> 
              <tr>
                <td colspan="7">
                     
                  <div class="pagination" style="font-size: 12px;"> 
                  	 <a href="#"   onclick= "submitForm(1)">&laquo; 首页</a>
	                  <a href="#"   onclick="submitForm(${result.previousPage })">&laquo; 上一页</a> 
	               		${result.currPage}/${result.pageCount }
	                    <a href="#"  onclick="submitForm(${result.nextPage})"   title="下一页">下一页 &raquo;</a>
	                    <a href="#"  onclick="submitForm(${result.pageCount})">尾页 &raquo;</a> 
                    </div>
                  <!-- End .pagination -->
                  <div class="clear"></div>
                </td>
              </tr>
            </tfoot>
            <tbody>
            	<c:forEach items="${result.result }" var="item">
              <tr>                
                <td>${item.userName }</td>
                <td>${item.operateName }</td>
                <td> </td>
                <td>${item.changeCount }</td>
                <td>${item.balance }</td>
                <td>
                	<fmt:formatDate value="${item.operateDate}"   pattern="yyyy-MM-dd  HH:mm:ss"/>                	
                </td>
                <td>
                	      ${item.note }
                </td>
               </tr>
        	</c:forEach>
            
            </tbody>
            
          </table>
         </form>
        </div>
        <!-- End #tab1 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->
    <div class="clear"></div>
    <%@ include file="/WEB-INF/jsp/common/copyright.jsp" %>
  </div>
  <!-- End #main-content -->
</div>
</body>
</html>